import { _decorator, Component, Label, Node } from "cc";
import { GameManager } from "../GameManager";
const { ccclass, property } = _decorator;

@ccclass("BombUI")
export class BombUI extends Component {
  @property(Label)
  bombLabel: Label = null;

  start() {
    GameManager.getInstance().node.on("onBombChange", this.onBombChange);
  }

  update(deltaTime: number) {}

  onBombChange(bombNum: number) {
    console.log("bombNum", bombNum);
    this.bombLabel.string = bombNum.toString();
  }
}
